<template>
  <el-form :model="props.form" v-bind="$attrs" disabled>
    <template v-for="(item, index) in props.list" :key="index">
      <el-form-item :label="item.label + ':'" v-if="!item.hide">
        <slot :name="item.field" :[item.field]="form[item.field]">
          <el-input v-model="form[item.field]" />
        </slot>
      </el-form-item>
    </template>
  </el-form>
</template>

<script setup>
const props = defineProps({
  form: {
    type: Object,
    default: () => {},
  },
  list: {
    type: Array,
    default: () => [],
  },
})
</script>

<style scoped lang="scss"></style>
